/*
 * @Author: your name
 * @Date: 2021-02-27 23:58:43
 * @LastEditTime: 2021-07-22 16:52:49
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \vue3-antd-koa\vue3-antd-pc\src\router\route.js
 */
/**
 * 路由表
 * @types {import("vue-router")}
 */

export const routes = [
  {
    path: "/:pathMatch(.*)*",
    name: "NotFound",
    component: () => import('@v/common/NotFound.vue')
  },
  {
    path: '/',
    redirect: '/show',
  },
  {
    path: '/show',
    name: 'Show',
    component: () => import('@v/show/Index.vue'),
    children: [
      {
        path: '',
        redirect: '/show/blogs/1'
      },
      {
        path: 'blogs/::pageNum',
        name: 'ShowBlog',
        component: () => import('@v/show/Blog.vue')
      },
      {
        path: 'books/:pageNum',
        name: 'ShowBook',
        component: () => import('@v/show/Book.vue')
      },
      {
        path: 'files',
        name: 'ShowFile',
        component: () => import('@v/show/File.vue')
      },
      {
        path: 'lists',
        name: 'ShowList',
        component: () => import('@v/show/List.vue')
      },
      {
        path: 'projects',
        name: 'ShowProject',
        component: () => import('@v/show/Project.vue')
      },
      {
        path: 'home',
        name: 'ShowHome',
        component: () => import('@v/show/Home.vue')
      },
      {
        path: 'about',
        name: 'ShowAbout',
        component: () => import('@v/show/About.vue')
      }
    ]
  },
  {
    path: '/manage',
    name: 'Manage',
    component: () => import('@v/manager/Index.vue'),
    children: [
      {
        path: "",
        redirect: "/manage/articles/1"
      },
      {
        path: '/login',
        name: 'ManageLogin',
        component: () => import('@v/manager/Login.vue')
      },
      {
        path: '/editor',
        name: 'ManageEditor',
        component: () => import('@v/manager/Editor.vue')
      },
      {
        path: "articles/:pageNum",
        name: "ManageArticle",
        component: () => import("@v/manager/Article.vue")
      }
    ]

  },
  {
    path: "/details/:id",
    name: "Details",
    component: () => import("@v/details/Index.vue")
  }
]

